{% extends "participants/participantsbase.html" %}

{% block css %}
    {{block.super}}
    <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/participants.css" >
{% endblock css %}

{% block content %}
<table class="participants-profile">
    <tr>
	{% if Viewer.status == "INSTRUCTOR" or course.show_student_avatars %}
	<td class="participants-profile-avatar">
	    {% load files %}
	    {% get_file_list for User as Files %}
	    {% if Files.avatar %}<img src="{{Files.avatar.url}}">
	    {% else %}<img src="{{STATIC_URL}}images/BlankAvatar.png">
	    {% endif %}
	</td>
	{% endif %}
	<td class="participants-profile-name">
	    <h1>{{User.first_name}} {{User.last_name}}</h1>
		{% if request.user != User %}
			{% if course.forum %}
				{% if not ban or ban.message_ban < ban.BAN_NEW_MESSAGES %}
					<br>
					<a href="{% course_url forum_send_message %}?recipient={{User.username}}"><img src="{{STATIC_URL}}images/compose.png" title="Send this user a message" height="25"></a>
				{% endif %}
			{% endif %}
			{% if Viewer.status == "INSTRUCTOR" or course.allow_students_to_email_others %}
				<br><a href="{% course_url email-user User.username %}" target="_blank">Email {{User.first_name}}</a>
			{% endif %}
		{% endif %}
	</td>
    {% if request.user == User %}
		<td class="participants-profile-options">
			<table border="1">
				<tr><th>Options</th></tr>
				<tr><td class="participants-profile-options-messages">
					<a href="{% course_url forum_view_messages %}">View&nbsp;Messages</a>
				</td></tr>
				{% if Viewer and Viewer.status == 'STUDENT' %}
					<tr><td class="participants-profile-options-grades">
						<a href="{% course_url apps.gradebook.views.index %}">View&nbsp;Grades</a>
					</td></tr>
				{% endif %}
				<tr>
					<td class="participants-profile-options-edit">
						<a href="{% course_url apps.participants.views.edit_profile %}">Edit&nbsp;Profile</a>
					</td>
				</tr>
				<tr>
					<td class="participants-profile-options-password">
					<a href="{% course_url apps.participants.views.password_change %}">Change&nbsp;Password</a>
					</td>
				</tr>
			</table>
		</td>
    {% endif %}
    </tr>
</table>
{% if Additions %}
    <hr class="clear">
<table>
    {% for item,value in Additions %}
	<tr>
	    <td>{{item.name}}:</td>
	    <td>{{value}}</td>
	</tr>
    {% endfor %}
</table>
{% endif %}
{% endblock content %}
